app.config(function ($stateProvider, $urlRouterProvider, $httpProvider) {
	$httpProvider.interceptors.push('requestRejector');
	$httpProvider.defaults.timeout = 10000;
	$urlRouterProvider.otherwise('/');
	
	//首页（咨询）
	$stateProvider.state('index', {
		url: '/', templateUrl: gettemplate('base.index.html'), controller: 'BaseIndex',
		resolve: {
			BaseIndexDefault: BaseLoginMain.BaseIndexDefault,
			BaseIndexData: BaseIndex.BaseIndexData
		}
	});
	
	//企业阶段选择
	$stateProvider.state('stage', {
		url: '/stage',templateUrl: gettemplate('base.stage.html'),controller: 'BaseStage',
		resolve: {
			BaseStageData: BaseStage.BaseStageData
		}
	});
	
	//登录初始
	$stateProvider.state('loginmain', {
		url: '/loginmain',templateUrl: gettemplate('base.loginmain.html'),controller: 'BaseLoginMain',
		resolve: {
			LoginMainDefault: BaseLoginMain.LoginMainDefault,
			BaseLoginMainData: BaseLoginMain.BaseLoginMainData,
		}
	});
	
	//咨询确认
	$stateProvider.state('consultdo', {
		parent: 'index',
		url: ':id', templateUrl: gettemplate('base.consult.do.html'), controller: 'BaseConsultDo',
		resolve: {
			BaseConsultDoTitle: BaseConsultDo.BaseConsultDoTitle,
			BaseConsultDoData: BaseConsultDo.BaseConsultDoData
		},params:{'cid':'','tid':''}
	});
	
	//其他登录
	$stateProvider.state('login', {
		url: '/login',templateUrl: gettemplate('base.login.html'),controller: 'BaseLogin',
		resolve: {
			BaseLoginData: BaseLogin.BaseLoginData,
		}
	});
	
	//注册
	$stateProvider.state('register', {
		url: '/register', templateUrl: gettemplate('base.register.html'), controller: 'BaseRegister',
		resolve: {
			BaseRegisterData: BaseRegister.BaseRegisterData,
		}
	});
	
	//注册导师步骤1
	$stateProvider.state('tutorregstep1', {
		url: '/tutorregstep1', templateUrl: gettemplate('base.tutorreg.step1.html'), controller: 'BaseTutorRegStep1',
		resolve: {
			BaseTutorRegStep1Data: BaseTutorRegStep1.BaseTutorRegStep1Data
		}
	});
	
	//注册导师步骤2
	$stateProvider.state('tutorregstep2', {
		url: '/tutorregstep2', templateUrl: gettemplate('base.tutorreg.step2.html'), controller: 'BaseTutorRegStep2',
		resolve: {
			BaseTutorRegStep2Data: BaseTutorRegStep2.BaseTutorRegStep2Data
		}
	});
	
	//注册导师步骤3
	$stateProvider.state('tutorregstep3', {
		url: '/tutorregstep3', templateUrl: gettemplate('base.tutorreg.step3.html'), controller: 'BaseTutorRegStep3',
		resolve: {
			BaseTutorRegStep3Data: BaseTutorRegStep3.BaseTutorRegStep3Data
		}
	});
	
	//重置密码
	$stateProvider.state('resetpwd', {
		url: '/resetpwd', templateUrl: gettemplate('base.resetpwd.html'), controller: 'BaseResetPwd',
		resolve: {
			BaseResetPwdData: BaseResetPwd.BaseResetPwdData
		}
	});
	
	//用户中心
	$stateProvider.state('ucenter', {
		url: '/ucenter', templateUrl: gettemplate('base.ucenter.html'), controller: 'BaseUcenter',
		resolve: {
			BaseUcenterData: BaseUcenter.BaseUcenterData
		}
	});
	
	//用户设置编辑
	$stateProvider.state('uedit', {
		url: '/uedit', templateUrl: gettemplate('base.uedit.html'), controller: 'BaseUedit',
		resolve: {
			BaseUeditDefault: BaseUedit.BaseUeditDefault,
			BaseUeditData: BaseUedit.BaseUeditData
		}
	});
	
	//修改导师真实姓名
	$stateProvider.state('tutorname', {
		url: '/tutorname', templateUrl: gettemplate('base.user.tutorname.html'), controller: 'UserTutorname',
		resolve: {
			UserTutornameData: UserTutorname.UserTutornameData
		}
	});
	
	//修改导师昵称
	$stateProvider.state('nickname', {
		url: '/nickname', templateUrl: gettemplate('base.user.nickname.html'), controller: 'UserNickname',
		resolve: {
			UserNicknameData: UserNickname.UserNicknameData
		}
	});
	
	//修改导师手机号
	$stateProvider.state('tutortel', {
		url: '/tutortel', templateUrl: gettemplate('base.user.tutortel.html'), controller: 'UserTutortel',
		resolve: {
			UserTutortelData: UserTutortel.UserTutortelData
		}
	});
	
	//修改导师任职机构 职务
	$stateProvider.state('tutorop', {
		url: '/tutorop', templateUrl: gettemplate('base.user.tutorop.html'), controller: 'UserTutorop',
		resolve: {
			UserTutoropData: UserTutorop.UserTutoropData
		}
	});
	 
	//修改导师邮箱
	$stateProvider.state('tutoremail', {
		url: '/tutoremail', templateUrl: gettemplate('base.user.tutoremail.html'), controller: 'UserTutoremail',
		resolve: {
			UserTutoremailData: UserTutoremail.UserTutoremailData
		}
	});
	//用户性别
	$stateProvider.state('usersex', {
		url: '/usersex', templateUrl: gettemplate('base.user.sex.html'), controller: 'BaseUsersex',
		resolve: {
			BaseUsersexData: BaseUsersex.BaseUsersexData
		}
	});
	//用户年龄层
	$stateProvider.state('userage', {
		url: '/userage', templateUrl: gettemplate('base.user.agegroup.html'), controller: 'BaseUserage',
		resolve: {
			BaseUserageData: BaseUserage.BaseUserageData
		}
	});
	//广告1
	$stateProvider.state('adabout1', {
		url: '/adabout1', templateUrl: gettemplate('adabout1.html'), controller: 'BaseAdabout1',
		resolve : {
			BaseAdabout1Data : BaseAdabout1.BaseAdabout1Data
		}
	});
	//广告2
	$stateProvider.state('adabout2', {
		url: '/adabout2', templateUrl: gettemplate('adabout2.html'), controller: 'BaseAdabout2',
		resolve: {
			BaseAdabout2Data: BaseAdabout2.BaseAdabout2Data
		}
	});
	//广告3
	$stateProvider.state('adabout3', {
		url: '/adabout3', templateUrl: gettemplate('adabout3.html'), controller: 'BaseAdabout3',
		resolve: {
			BaseAdabout3Data: BaseAdabout3.BaseAdabout3Data
		}
	});
	//发现问题
	$stateProvider.state('findquestion', {
		url: '/findquestion', templateUrl: gettemplate('find.question.html'), controller: 'FindQuestion',
		resolve: {
			FindQuestionData: FindQuestion.FindQuestionData
		}
	});
	//发现问题
	$stateProvider.state('findreplay', {
		url: '/findreplay', templateUrl: gettemplate('find.replay.html'), controller: 'FindReplay',
		resolve: {
			FindReplayData: FindReplay.FindReplayData
		}
	});
	//文章详情
	$stateProvider.state('articleid', {
		url: '/articleid/:id', templateUrl: gettemplate('base.article.info.html'), controller: 'BaseArticleinfo',
		resolve: {
			BaseArticleinfoData: BaseArticleinfo.BaseArticleinfoData
		}
	});
	$stateProvider.state('tutorucenter', {
		url: '/tutorucenter', templateUrl: gettemplate('base.tutor.ucenter.html'), controller: 'BaseTutorUcenter',
		resolve: {
			BaseTutorUcenterData: BaseTutorUcenter.BaseTutorUcenterData
		}
	});
	//导师中心
	$stateProvider.state('tutorcenter', {
		url: '/tutorcenter', templateUrl: gettemplate('user.tutor.center.html'), controller: 'UserTutorCenter',
		resolve: {
			UserTutorCenterData: UserTutorCenter.UserTutorCenterData
		}
	});
	//导师首页
	$stateProvider.state('tutorindex', {
		url: '/tutorindex/:id', templateUrl: gettemplate('user.tutor.index.html'), controller: 'UserTutorindex',
		resolve: {
			UserTutorindexData: UserTutorindex.UserTutorindexData
		}
	});
	//关于专家
	$stateProvider.state('tutornote', {
		url: '/tutornote/:id', templateUrl: gettemplate('user.tutor.note.html'), controller: 'UserTutorNote',
		resolve: {
			UserTutorNoteData: UserTutorNote.UserTutorNoteData
		}
	});
	//专家成功案例
	$stateProvider.state('tutorconsult', {
		url: '/tutorconsult/:id', templateUrl: gettemplate('user.tutor.consult.html'), controller: 'UserTutorConsult',
		resolve: {
			UserTutorConsultData: UserTutorConsult.UserTutorConsultData
		}
	});
	//学员评价
	$stateProvider.state('tutoreva', {
		url: '/tutoreva/:id', templateUrl: gettemplate('user.tutor.evaluation.html'), controller: 'UserTutorEva',
		resolve: {
			UserTutorEvaData: UserTutorEva.UserTutorEvaData
		}
			
	});
	//用户订单
	$stateProvider.state('order1', {
		url: '/order1', templateUrl: gettemplate('user.order.html'), controller: 'UserOrder',
		params:{'status':'0','id':0},
		resolve: {
			UserOrderData: UserOrder.UserOrderData
		}
	});
	//用户订单
	$stateProvider.state('order2', {
		url: '/order2', templateUrl: gettemplate('user.order.html'), controller: 'UserOrder',
		params:{'status':'1','id':0},
		resolve: {
			UserOrderData: UserOrder.UserOrderData
		}
	});
	//用户订单
	$stateProvider.state('order3', {
		url: '/order3', templateUrl: gettemplate('user.order.html'), controller: 'UserOrder',
		params:{'status':'2','id':0},
		resolve: {
			UserOrderData: UserOrder.UserOrderData
		}
	});
	//选择城市
	$stateProvider.state('tutorcity', {
		url: '/tutorcity', templateUrl: gettemplate('base.user.tutorcity.html'), controller: 'UserTutorCity',
		resolve: {
			UserTutorCityData: UserTutorCity.UserTutorCityData
		}
	});
	//选择行业
	$stateProvider.state('tutortrade', {
		url: '/tutortrade', templateUrl: gettemplate('base.user.tutortrade.html'), controller: 'UserTutorTrade',
		resolve: {
			UserTutorTradeData: UserTutorTrade.UserTutorTradeData
		}
	});
	//评价咨询
	$stateProvider.state('consultevaluation', {
		url: '/consultevaluation/:id', templateUrl: gettemplate('base.consult.evaluation.html'), controller: 'BaseConsultEvaluation',
		resolve: {
			BaseConsultEvaluationData: BaseConsultEvaluation.BaseConsultEvaluationData
		}
	});
	
	//充值
	$stateProvider.state('charge', {
		url: '/charge/:id/:t', templateUrl: gettemplate('user.bag.charge.html'), controller: 'UserBagCharge',
		resolve: {
			UserBagChargeData: UserBagCharge.UserBagChargeData
		}
	});
	
	//钱包
	$stateProvider.state('bag', {
		url: '/bag/:id/:t', templateUrl: gettemplate('user.bag.html'), controller: 'UserBag',
		resolve: {
			UserBagData: UserBag.UserBagData
		}
	});
	
	//已收藏导师列表 未咨询
	$stateProvider.state('followtutorw', {
		url: '/followtutorw', templateUrl: gettemplate('base.tutuor.follow.wzx.html'), controller: 'BaseTutorFollowWzx',
		resolve: {
			BaseTutorFollowWzxData: BaseTutorFollowWzx.BaseTutorFollowWzxData
		}
	});
	//已收藏导师列表 已咨询
	$stateProvider.state('followtutory', {
		url: '/followtutory', templateUrl: gettemplate('base.tutuor.follow.yzx.html'), controller: 'BaseTutorFollowYzx',
		resolve: {
			BaseTutorFollowYzxData: BaseTutorFollowYzx.BaseTutorFollowYzxData
		}
	});
	//提现列表
	$stateProvider.state('withdrawalslist', {
		url: '/withdrawalslist', templateUrl: gettemplate('user.withdrawals.list.html'), controller: 'UserWithDrawalsList',
		resolve: {
			UserWithDrawalsListData: UserWithDrawalsList.UserWithDrawalsListData
		}
	});
	//提现功能
	$stateProvider.state('withdrawals', {
		url: '/withdrawals', templateUrl: gettemplate('user.withdrawals.html'), controller: 'UserWithDrawals',
		resolve: {
			UserWithDrawalsData: UserWithDrawals.UserWithDrawalsData
		}
	});
	//聊天
	$stateProvider.state('chatmsg', {
		url: '/chatmsg/:id/:cid', templateUrl: gettemplate('user.chatmsg.html'), controller: 'UserChatmsg',
		resolve: {
			UserChatmsgData: UserChatmsg.UserChatmsgData
		}
	});
	//导师订单
	$stateProvider.state('tutororder1', {
		url: '/tutororder1', templateUrl: gettemplate('user.tutor.order.html'), controller: 'UserTutorOrder',
		params:{'status':'0','id':0},
		resolve: {
			UserTutorOrderData: UserTutorOrder.UserTutorOrderData
		}
	});
	//导师订单
	$stateProvider.state('tutororder2', {
		url: '/tutororder2', templateUrl: gettemplate('user.tutor.order.html'), controller: 'UserTutorOrder',
		params:{'status':'1','id':0},
		resolve: {
			UserTutorOrderData: UserTutorOrder.UserTutorOrderData
		}
	});
	//学员中心
	$stateProvider.state('userindex', {
		url: '/userindex/:id', templateUrl: gettemplate('base.user.index.html'), controller: 'BaseUserIndex',
		resolve: {
			BaseUserIndexData: BaseUserIndex.BaseUserIndexData
		}
	});
	//邀请
	$stateProvider.state('invitation', {
		url: '/invitation', templateUrl: gettemplate('base.user.invitation.html'), controller: 'BaseUserInvitation',
		resolve: {
			BaseUserInvitationData: BaseUserInvitation.BaseUserInvitationData
		}
	});
	//用户反馈
	$stateProvider.state('feedback', {
		url: '/feedback', templateUrl: gettemplate('base.user.feedback.html'), controller: 'BaseUserFeedBack',
		resolve: {
			BaseUserFeedBackData: BaseUserFeedBack.BaseUserFeedBackData
		}
	});
	//学员评价 已咨询
	$stateProvider.state('studenteva', {
		url: '/studenteva', templateUrl: gettemplate('tutor.student.eva.yzx.html'), controller: 'TutorStudentEvaYzx',
		resolve: {
			TutorStudentEvaYzxData: TutorStudentEvaYzx.TutorStudentEvaYzxData
		}
	});
	//学员评价 未咨询
	$stateProvider.state('studentevawzx', {
		url: '/studentevawzx', templateUrl: gettemplate('tutor.student.eva.wzx.html'), controller: 'TutorStudentEvaWzx',
		resolve: {
			TutorStudentEvaWzxData: TutorStudentEvaWzx.TutorStudentEvaWzxData
		}
	});
	//选择朋友
	$stateProvider.state('selectf', {
		url: '/selectf', templateUrl: gettemplate('base.user.invitation.selectf.html'), controller: 'BaseUserInvitationSelectf',
		resolve: {
			BaseUserInvitationSelectfData: BaseUserInvitationSelectf.BaseUserInvitationSelectfData,
			BaseUserInvitationSelectfInfo: BaseUserInvitationSelectf.BaseUserInvitationSelectfInfo
		}
	});
	//找回密码
	$stateProvider.state('findpwd', {
		url: '/findpwd', templateUrl: gettemplate('base.findpwd.html'), controller: 'BaseFindPwd'
	});
	//帮助中心
	$stateProvider.state('help', {
		url: '/help', templateUrl: gettemplate('base.user.help.html'), controller: 'BaseUserHelp',
		resolve: {
			BaseUserHelpData: BaseUserHelp.BaseUserHelpData
		}
	});
	//设置中心
	$stateProvider.state('setting', {
		url: '/setting', templateUrl: gettemplate('base.setting.html'), controller: 'BaseSetting',
		resolve: {
			BaseSettingData: BaseSetting.BaseSettingData
		}
	});
	//手机修改
	$stateProvider.state('telmodify', {
		url: '/telmodify', templateUrl: gettemplate('base.telmodify.html'), controller: 'BaseTelModify',
		resolve: {
			BaseTelModifyData: BaseTelModify.BaseTelModifyData
		}
	});
	//手机修改other
	$stateProvider.state('othertelmodify', {
		url: '/othertelmodify', templateUrl: gettemplate('base.othertelmodify.html'), controller: 'BaseOtherTelModify',
		resolve: {
			BaseOtherTelModifyData: BaseOtherTelModify.BaseOtherTelModifyData
		}
	});
	//联系客服
	$stateProvider.state('contact', {
		url: '/contact', templateUrl: gettemplate('base.contactkefu.html'), controller: 'BaseContactKeFu',
		resolve: {
			BaseContactKeFuData: BaseContactKeFu.BaseContactKeFuData
		}
	});
	
	//指定导师咨询
	$stateProvider.state('appointtutor', {
		url: '/appointtutor/:id', templateUrl: gettemplate('user.appointtutor.html'), controller: 'UserAppointTutor',
		resolve: {
			UserAppointTutorData: UserAppointTutor.UserAppointTutorData
		},params:{'gid':''}
	});

	//touch demo
	$stateProvider.state('touchdemo', {
		url: '/touchdemo', templateUrl: gettemplate('touch.demo.html'), controller: 'touchdemo'
	});

	$stateProvider.state('network',{url:'/network', templateUrl: gettemplate('network.html'), controller: 'NetworkCtrl'});
});